from public.action import *
from public.business import *
from public.testData import *
from public.tools import *
import time

testCase = "DBshop016-商品分类删除侧边设置流程"
# 1.登录后台，商品管理，管理分类，前台侧边设置
firefox=openBrowser(url)
firefox.get(urlAdmin)
DBshopLoginAdmin(firefox)
DBshopEnterMenu3(firefox,'商品管理','管理分类','前台侧边设置')
# 2.删除侧边侧边显示
firefox.find_element_by_xpath("//td[contains(.,'网站很好看')]/following-sibling::td[4]/a[2]").click()
# 断言：找不到前台侧边显示即测试成功
try:
    firefox.find_element_by_xpath("//td[contains(.,'网站很好看')]")
    writeLog("%s 测试失败"%testCase)
    getPhoto(firefox)
except:
    writeLog("%s 测试成功" % testCase)
firefox.quit()

